package cn.wzy.mapper;


import cn.wzy.pojo.Permission;
import cn.wzy.vo.GoPageVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * (Permission)表数据库访问层
 *
 * @author makejava
 * @since 2022-12-12 19:57:23
 */
public interface PermissionMapper extends BaseMapper<Permission> {


    List<Permission> permissionPage(@Param("keyword") String keyword, @Param("stater") Long stater, @Param("pageSize") Long pageSize);

    Long getTotal(GoPageVo goPageVo);

    void addPermission(Permission permission);

    void updatePermission(Permission permission);

    List<Permission> getPermissionLower(Long id);

    void deletePermission(Long id);

    List<Permission> getPermissionList(List<Long> ids);

    void deletePermissionList(List<Long> ids);

    List<Permission> getPermissionParent();

    Permission getPermissionBySn(String sn);

//    获取角色的权限
    List<Permission> getPermissionByRoleId(Long RoleId);

    List<Permission> getPermissionTree();

    List<String> getPermissionAllSn();

}

